Data structures in the form of trees are used to represent data and programs that are hierarchically structured. Even non-hierarchically structured data may be represented in a tree structure. The tree data structure is composed of nodes and links between nodes. Linked nodes are said to be in parent-child relationships. In simple tree data structures, each node may store some amount of data and links to its child nodes. For example, in a tree data structure representing an organizational chart, a node may contain the name and title of an individual employee, and links pointing to nodes containing data on each employee working for that employee. The XML and HTML standards and parsers for use with computer programming languages may also employ tree data structures.
Often, tree data structures need to be searched for information, where the search considers the structure of the tree as well as the data that might reside on each node. For example, a tree data structure representing an organizational chart may need to be searched to find all employees who are managers who have employees named Fred working for them. Current methods for searching tree data structures involve writing computer program code designed for the specific tree data structure search and the specific type of search being performed. Prefix, infix, and postfix traversals are common methods of searching tree data structures. Writing the computer program code to perform a specific type of tree search can be time consuming, and there is often no intuitive way for a user to interact with a tree searching program.